package com.swufe.ccb.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.swufe.ccb.dao.AffairHandleDao;
import com.swufe.ccb.entity.AffairHandle;

@WebServlet("/affair")
public class AffairHandleServlet extends HttpServlet {
	private AffairHandleDao affairhandledao = new AffairHandleDao();

	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		
		HttpSession session = req.getSession();
		AffairHandle affairhandle = (AffairHandle)session.getAttribute("affair");
		
			List<AffairHandle> list = affairhandledao.findByAffair();
			System.out.print("Servlet输出"+list);
			req.setAttribute("list", list);
			req.getRequestDispatcher("/transhandle.jsp").forward(req, resp);
		
	}

}
